<template>
	<div id="new_home">
		<header v-if="!isWxPublic && $.env !== 'webOrWechat'">
			<div class="searchBox" @click="goApp">
				<i class="iconfont icon-sousuo"></i>
				<span>请输入感兴趣的地点\身边店\服务\商品\资讯</span>
			</div>
			<!-- <div class="goWrapper">
                <i class="iconfont icon-tianjia-" @click="go('shop_list')"></i>
            </div> -->
		</header>
		<tab :tabData="tabData" :menu="false" :count="count">
	      	<div slot="tab0">
	      		<fork-list></fork-list>
	      	</div>
	      	<div slot="tab1">
	      		<commend-list></commend-list>
	      	</div>
	      	<div slot="tab2">
	          <shoparound-list></shoparound-list>
	       </div>
      	</tab>
	</div>
</template>
<script>
	import tab from 'components/tab/tabs'
	import forkList from './fork-list'
	import commendList from './commend-list'
	import shoparoundList from './shoparound-list'
	export default {
		components: {
			tab,forkList,commendList,shoparoundList
		},
		data() {
			return {
				isWxPublic:false,
				tabData:[
			        {
			          title: "关注",
			          redMsg: false
			        },
			        {
			          title: "推荐",
			          redMsg: false
			        },
			        {
			          title: "身边店",
			          redMsg: false
			        }
			      ],
			      count:[false,true,false]
			};
		},
		created() {
			if(this.$.env === "wxPublic") {
				this.isWxPublic = true;
			}
//			if(/micromessenger/i.test(navigator.userAgent) && this.$.query('shopId')){
//				this.setAttr('shopId',this.$.query('shopId'))
//			}
		},

		methods: {
			//跳转到原生
			goApp() {
				this.$.push("router_service", {}, resp => {});
			},
			
		}
	}
</script>

<style lang="scss">
	header {
		width: 100vw;
		height: 46px;
		line-height: 46px;
		font-size: 16px;
		background-color: #f7f7f7;
		color: #666;
		display: flex;
		z-index: 1000;
	}
	#new_home .uncheck{
		margin-bottom: 2px;
	}
	#new_home .tabs {
		width: 100vw;
		z-index: 1000;
		background-color: #fff !important;
	}
	header .searchBox {
	  flex: 1;
	  padding: 0 10px;
	  position: relative;
	}
	header .searchBox i {
	  position: absolute;
	  color: #666;
	  left: 20px;
	  top: 2px;
	}
	header .searchBox span {
	  display: inline-block;
	  width: 100%;
	  height: 36px;
	  line-height: 36px;
	  padding-left: 10px;
	  text-align: center;
	  border-radius: 10px;
	  color: #666;
	  background-color: rgba(0, 0, 0, 0.1);
	  font-size: 14px;
	}
</style>